/**
 * @Author YuanYuan
 * @Date 2022/5/7
 * @Time 10:27
 */
public class TestDemo {
    public static String my_ToString(int[] arr) {
        String str = "[";
        for (int i = 0; i < arr.length; i++) {
            str += arr[i];
            if(i != arr.length-1){
                str+=",";
            }
        }
        str+="]";
        return str;
    }
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        System.out.println(my_ToString(arr));
    }
}
